<div class="referbox">
<h4 class="dis-cons-title">商品评论</h4>
  <div class="evalubox clearfix">
  <{if $point_status == 'on'}>
    <div class="evalubox-left">
      <div class="scores-wrap">
        <ul class="out">
          <li class="flt" >商品评分：</li>
          <li>
            <div class="star-div flt " style="padding-top:2px;padding-top:0\9"><!--咨询页面这个地方class可调用用"star-no"-->
              <ul>
                <li class="star<{$goods_point.avg}>"></li>
              </ul>
            </div>
			 <span class="scores_size"><{$goods_point.avg_num}></span>
            </li>
          <li style="clear:both">(<{t}>共<{/t}><span class="value-color"><{$total_point_nums}></span><{t}>人评分<{/t}>)</li>
        </ul>
      </div>
      <div class="scores-item">
        <ul>
        	<{foreach from=$_all_point item="_all_point"}>
          <li><label><{$_all_point.type_name}>:</label> <span class="colorRed fontbold"><{$_all_point.avg}></span></li>
          <{/foreach}>
        </ul>
      </div>
    </div>
	<{/if}>
    <div class="evalubox-right">
      <div class="rightbox" ><!--<h4>评价说明</h4>--><p><{$comment.goods_discuss_notice}></p>
</div>
      <div class="floatright"><a href="#write_discuss" class="orangebtn allnum "><span>我要评论</span></a></div>
    </div>
  </div>
  <a name="discuss_all_info"></a>
  <div class="goods-discus-title bulelink"> <{t}>共<{/t}><span class="value-color"><{$comment.discussCount|default:'0'}></span><{t}>个用户评价<{/t}>&nbsp;&nbsp;<span class="all_link"><a href="#discuss_all_info" class="allnum"><{t}>查看所有评论<{/t}></a></span> </div>
<div class="consult-content">
    <div class="consult-panel" id="discuss_content"><{include file="site/product/discuss_content.html" app="b2c"}></div>
</div>

 </div>

  <div style="display:none" class="displaydiv">
<!--  发表评论区域-->
<a name="write_discuss"></a>
<form class="addcomment" method="post" action='<{link app=b2c ctl=site_comment act=toComment arg0=$goods.goods_id arg1=discuss}>' onsubmit='checkFormReqs(event);'>
      <div class="review-box">
      <h4 class="review-title"><{t}>发表评论<{/t}><span><{if $point_status == 'on'}>（点击五角星评分）<{/if}></span></h4>
<div class="division clearfix">
      <div <{if $discuss_status}>class="leftbox"<{else}>class="leftbox message-login"<{/if}> >
      <div class="review-textarea">
      <ul>
      <li>
	  <{if $point_status == 'on'}>
      	<div class="start-point" style=""><!--咨询页面这个class可以调用"nodisplay"-->

	          <{foreach from=$comment_goods_type item=comment_goods_type}>
	          <div class="clearfix">
				<div class="span-2 textright">
				<label><{$comment_goods_type.name}>:</label>
				</div>
				<div id="rate_<{$comment_goods_type.type_id}>" class="star-point-items span-auto">
					<div class="b" style="left:0px;">&nbsp;</div>
					<div class="f">&nbsp;</div>
				</div>
				<div class="span-auto font11px" style="color:orange;font-weight:bold;">5
				</div>
				<input type='hidden' name="point_type[<{$comment_goods_type.type_id}>][point]"/>
			   </div>
	          <{/foreach}>
	     </div>
		 <{/if}>
      </li>
        <{if $discuss_status}>
             <li>
             <{assign var="placeholder" value="欢迎发表评论（最多1000字）"}>
        <{else}>
             <li class="message-login">
             <{assign var="disb" value="true"}>
             <p><{$discuss_message}></p>
        <{/if}>
    	<{input type="textarea" class="x-input inputstyle font12px db mb5"  disabled=$disb placeholder=$placeholder vtype="sendcomments" rows="5" name="comment" style="width:97%"}> <div class="infotips textright" ><span class="font-orange words-limit">0</span>/1000</div></li>

          <{if $login eq "nologin"}>
        <li><{t}>联系方式：<{/t}> <{input type="text" vtype=required class="inputstyle"  disabled=$disb size=20 name="contact"}><span class="infotips"><{t}>(可以是电话、email、qq等).<{/t}></span></li>
          <{/if}>
          <{if $discussshow == "on"}>
          <!--
            <li><{t}>验证码：<{/t}>
			<{input type="number" vtype=required size="4" maxlength="4" name="discussverifyCode"}>&nbsp;<img src="<{link app="b2c" ctl="site_comment" act="gen_dissvcode" arg0=$smarty.now}>" border="1" id="discussimgVerifyCode"/><a href="javascript:changeimg('discussimgVerifyCode','discuss')">&nbsp;<{t}>看不清楚?换个图片<{/t}></a>
        </li> -->
            <li><{t}>验证码:  <{/t}><{input type="number" vtype=required size="4" disabled=$disb maxlength="4" class="showdisaskvcode" name="discussverifyCode"}>&nbsp;<img border="1" id="discussimgVerifyCode" style="display:none;" codesrc="<{link app="b2c" ctl="site_comment" act="gen_dissvcode"}>"/><a  onclick="javascript:changeimg('discussimgVerifyCode','discuss');" class="no-unl">&nbsp;<{t}>点击更换新图片<{/t}></a><span></span></li>
          <{/if}>
            <{if $login != "nologin"}>
            <li><input type="text" name="" style="display:none" />
              <{t}>匿名发表:<{/t}>
              <input type="checkbox" name="hidden_name" value="YES"/>
            </li>
            <{/if}>
    	<li style="padding-left:0"><button id="cart-coupon-submitBtn" class="btn" rel="_request" type="submit"> <span><span> <{t}>提交评论<{/t}></span></span> </button></li>
      </ul>
      </div>

      </div>
      <div class="rightbox"><p><{$comment.submit_comment_notice.discuss}></p>
</div>
        <div class="clear"></div>
      </div>
      </div>
    </form>
</div>

	 <script>

		window.addEvent('domready',function(){
			$$('.star-point-items').each(function(i){
					var _c = i.getNext();
					var _b = i.getElement('.b');
					var _f = i.getElement('.f');
					var _ipt = i.getNext('input');
						_ipt.value = 5;
					i.addEvents({
							'mousemove':function(e){
								var offset = (e.page.x - i.getPosition([document.body]).x);
								var _left = (offset-i.offsetWidth).limit(0-i.offsetWidth,0);
								var count  = (5*((i.offsetWidth + _left)/(i.offsetWidth)));
									if(count<0.3){count  = 0}else{count = Math.ceil(count);}
								_b.setStyle('left',i.offsetWidth*(count/5) - i.offsetWidth);
								_c.set('text',_ipt.value = count);
							},
							'mouseenter':function(e){
								this.fireEvent('mousemove',e);
                            },
                            'mouseout':function(e){
                                if(_b.getStyle('left') === '-92px') {
                                    _b.setStyle('left','0');
                                    _c.set('text',5);
                                }
                            }
					});
					/*fix png*/
					if(Browser.ie6){
						_f.setStyles({
							'filter':'progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=image, src='+_f.getStyle('background-image').match(/url\(([^\)]*)/)[1]+')',
							'background':'none'
						});
					}
			});

		});
	</script>
